﻿using System;
using System.IO;

namespace MyFunction.dbFuncion
{
	/// <summary>
	/// 数据库联接字串类
	/// </summary>
	public class dBFunctions
	{
        /// <summary>
        ///  Sqlite 联接字串
        /// </summary>
		public static string ConnectionStringSQLite
        {
            get
            {

                //string database = WebPath.GetRootPath ( ) + "\\app_data\\rpdatabase.db";
                string database = AppDomain.CurrentDomain.BaseDirectory + "\\database\\datadict.db";
                string connectionString =
                   @"Data Source=" + Path.GetFullPath ( database )+" ;Pooling=true;FailIfMissing=false ";
                return connectionString;
            }
        }

        /// <summary>
        ///  ms sql 数据库联接字串
        /// </summary>
        public static string ConnectionStringMsSql
        {
            get
            {
                return @"Data Source =192.168.0.3\sqlserver;Database =mrp;Uid =wip_common_user;Pwd=commwip";
            }
        }
    }
}
